package com.xnyzc.lhy.didi;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ImportResource;
import org.springframework.retry.annotation.EnableRetry;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@EnableAsync
@EnableRetry
@EnableScheduling
@EnableSwagger2
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true, jsr250Enabled = true)
@EnableFeignClients
@EnableDiscoveryClient
@EnableTransactionManagement
@EnableAutoConfiguration
@ComponentScan(basePackages = {"com.xnyzc.lhy.common.component", "com.xnyzc.lhy.didi"})
@ImportResource("classpath:spring/spring-*.xml")
@MapperScan({"com.xnyzc.lhy.didi.mapper","com.xnyzc.lhy.common.component.mapper"})
@SpringBootApplication
public class DidiApplication {
    public static void main(String[] args) {
        try{
            System.setProperty("rocketmq.client.log.loadconfig", "false");
            SpringApplication.run(DidiApplication.class, args);
        }catch (Exception e){
            System.out.println("err --->" + e.getMessage());
        }
    }
}
